<!--
 * @Descripttion: 出手鸭小程序
 * @version:1.0.1 
 * @Author: HHL
 * @Date: 2023-10-19 10:21:07
 * @LastEditTime: 2023-11-12 20:45:24
 * @LastEditors: sueRimn
-->

<template>
  <uni-popup
    ref="popup"
    type="bottom"
    :safe-area="false"
    @change="change"
    :is-mask-click="isMaskClick"
  >
    <view class="popup-content">
      <view class="title">
        <view class="h3 u-one-line" v-show="!hideTitle">{{title}}</view>
        <view class="close-btn" @click="close" v-show="!hideClose">
          <uni-icons type="closeempty" size="18" color="#333333" />
        </view>
      </view>
      <slot />
    </view>
  </uni-popup>
</template>


<script>
export default {
  props: {
    title: { type: String, default: '这里是标题' },
    hideClose: { type: Boolean, default: false },
	hideTitle: { type: Boolean, default: false },
    isMaskClick: { type: Boolean, default: false }
  },

  methods: {
    open() {
      this.$refs.popup.open()
    },

    close() {
      this.$refs.popup.close()
    },

    change(e) {
      this.$emit('change', e)
    }
  }
}
</script>

<style lang="scss" scoped>
.popup-content{
  background: #FFFFFF;
  border-radius: 30rpx 30rpx 0 0;
}

.title{
  position: relative;
  .h3{
    width: 80%;
    font-size: 30rpx;
    font-weight: 500;
    line-height: 90rpx;
    color: #333;
    text-align: center;
    margin: 0 auto;
  }
  .close-btn{
    position: absolute;
    top: 0;
    right: 6rpx;
    padding: 24rpx;
  }
}



</style>